a=input("请输入一个字符串")
zifu=0
kongge=0
shuzi=0
qita=0
for b in a:
    if b>'a'and b<'z'or b>'A' and b<'Z':
        zifu+=1
    elif b==" ":
        kongge+=1
    elif b in "0123456789":
        shuzi+=1
    else:
        qita+=1
print(zifu)
print(kongge)
print(shuzi)
print(qita)
